<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use yii\web\NotFoundHttpException;

//chỉ có admin có quyền xem thông tin user
if(Yii::$app->user->isGuest || Yii::$app->user->identity->acc_type!=0)
{
	throw new NotFoundHttpException('The requested page does not exist.');
}
else
{
	/* @var $this yii\web\View */
	/* @var $model app\models\Account */

	$this->title = $model->acc_id;
	//$this->params['breadcrumbs'][] = ['label' => 'Accounts', 'url' => ['index']];
	//$this->params['breadcrumbs'][] = $this->title;
	?>
	<div class="user-view">

		<h1><?= Html::encode($this->title) ?></h1>

		<p>
			<?= Html::a('Cập nhật', ['update', 'id' => $model->acc_id], ['class' => 'btn btn-primary']) ?>
			<?= Html::a('Xóa', ['delete', 'id' => $model->acc_id], [
				'class' => 'btn btn-danger',
				'data' => [
					'confirm' => 'Are you sure you want to delete this item?',
					'method' => 'post',
				],
			]) ?>
		</p>

		<?= DetailView::widget([
			'model' => $model,
			'attributes' => [
				'acc_id',
				'username',
				'full_name:ntext',
				'birthday',
				'address:ntext',
				'phone:ntext',
				'email:email',
			],
		]) ?>

	</div>

<?php
}
?>